package com.fr.base.core.antlr.collections.impl;

import java.util.Enumeration;
import java.util.NoSuchElementException;

class VectorEnumerator
  implements Enumeration
{
  Vector vector;
  int i;

  VectorEnumerator(Vector paramVector)
  {
    this.vector = paramVector;
    this.i = 0;
  }

  public boolean hasMoreElements()
  {
    synchronized (this.vector)
    {
      return ((this.i <= this.vector.lastElement) ? 1 : false);
    }
  }

  public Object nextElement()
  {
    synchronized (this.vector)
    {
      if (this.i > this.vector.lastElement)
        break label43;
      return this.vector.data[(this.i++)];
      label43: throw new NoSuchElementException("VectorEnumerator");
    }
  }
}